package com.hgw.Demo04_BuilderPattern.Exercises6_7_4;

/**
 * Data time:2021/12/13 10:02
 * StudentID:2019112118
 * Author:hgw
 * Description:
 */
public class NotebookBuilder extends Builder{
    @Override
    public void buildCpu() {
        computer.setCpu("Intel");
    }

    @Override
    public void buildMemory() {
        computer.setMemory("金士顿");
    }

    @Override
    public void buildHardDisk() {
        computer.setHardDisk("西部数据");
    }

    @Override
    public void buildHost() {
        computer.setHost("不需要主机");
    }

    @Override
    public void buildMonitor() {
        computer.setMonitor("三星");
    }

    // 覆盖钩子方法 ，是否需要主机
    public boolean isHost() {
        return false;
    }
}
